package com.exampleyyy.demoyyy.controller;

import com.exampleyyy.demoyyy.SHITIYYY.Student;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@Service
@RequestMapping("/web")
public class WebController {

    @RequestMapping("/get")
    public String get(){
        log.info("输出我是get");
        return "我是get";
    }

    @PostMapping("/post")
    public String post(@RequestBody Student student){
        log.info("输出post method student={}",student );
        return "我是post";
    }


    @PostMapping("/postHead")
    public String postHead(@RequestHeader("token") String token){
        log.info("输出token : "+token);
        return "我是post请求和token值:"+token;
    }


}

